package com.xmz.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

/**
* <p>
    * 
    * </p>
*
* @since 2025-01-14
*/
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @TableName("user")
    public class User  {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @NotNull
    private Integer id;
    private String name;

    @Min(value = 1)
    @Max(value = 188)
    private Integer age;


    private String password;
    @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String phone;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    @TableLogic
    private Integer deleted;
}
